﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RoleAndPowerManage.aspx.cs"
    Inherits="Admin_RootAndPowerManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <%--<link href="../css/PageStyle.css" rel="Stylesheet" type="text/css" />--%>
    <style type="text/css">
        body
        {
             margin: 0px 0px 0px 0px;
	        text-align:left;
	        font-size: 9pt;
	        font-family: 宋体;
        }
        table
        {
        	vertical-align:top;
        }
        td
        {
        	vertical-align:top;
            text-align: center;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <table style="vertical-align: top">
            <tr>
                <td><h1>角色管理</h1></td>
                <td><h1>权限分配</h1></td>
            </tr>
            <tr>
                <td>
                    <table style="vertical-align: top">
                        <tr>
                            <td>
                                角色名：
                            </td>
                            <td>
                                <asp:TextBox ID="tbRootName" runat="server" Width="200px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Button ID="btnSure" runat="server" Text="确定" onclick="btnSure_Click"></asp:Button>&nbsp;
                                <asp:Button ID="btnCancel" runat="server" Text="取消" onclick="btnCancel_Click"></asp:Button>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="text-align:left;">
                                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                    <ContentTemplate>
                                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                                            CellPadding="4" ForeColor="#333333" GridLines="None">
                                            <RowStyle BackColor="#EFF3FB" />
                                            <Columns>
                                                <asp:BoundField HeaderText="ID" />
                                                <asp:BoundField HeaderText="角色名" />
                                                <asp:CommandField SelectText="修改" ShowSelectButton="True" />
                                                <asp:CommandField SelectText="分配权限" ShowSelectButton="True" />
                                                <asp:CommandField DeleteText="&lt;div id=&quot;de&quot; onclick=&quot;JavaScript:return confirm('请确认该角色下没有用户否则无法删除！一旦删除无法恢复！')&quot;&gt;删除&lt;/div&gt;" 
                                                    ShowDeleteButton="True" />
                                            </Columns>
                                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                            <EditRowStyle BackColor="#2461BF" />
                                            <AlternatingRowStyle BackColor="White" />
                                        </asp:GridView>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                    </table>
                </td>
                <td>
                    <table>
                        <tr>
                            <td>
                                <div>
                                    <asp:Button ID="btnAssignPower" runat="server" Text="分配权限"></asp:Button>&nbsp;&nbsp;
                                    <asp:Button ID="btnReset" runat="server" Text="重新选择"></asp:Button>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div>
                                    <asp:Label ID="lblSelectRootName" runat="server" Text="您尚未选择角色"></asp:Label>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:left">
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                    <ContentTemplate>
                                        <asp:TreeView ID="treeMenuPower" runat="server" ShowCheckBoxes="All" 
                                            ExpandDepth="1">
                                        </asp:TreeView>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
